package com.zp.crm.dao.UserDao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zp.crm.entity.User.UserEntity;

public interface UserDao {

	UserEntity selectByNameLogin(@Param(value="name")String username);

	String selectBykeyUserRoid(@Param(value="u_code")String u_id);

	List<UserEntity> selectBykeyRoid(@Param(value="id")String c);

	UserEntity selectBykeyCode(@Param(value="user_id")String user_id);

	int selectByCount();

	List<UserEntity> selectList(@Param(value="page")int pageIndex, @Param(value="size")int size);

	int UserStutsUpdate(UserEntity entity);

	int selectCreateCount(@Param(value="username")String username, @Param(value="name")String name,@Param(value="stuts") String stuts);

	List<UserEntity> selectCreateList(@Param(value="username")String username,@Param(value="name") String name, @Param(value="stuts")String stuts, @Param(value="page")int pageIndex,@Param(value="size") int size);

	int UserRoidUpdate(@Param(value="code")String code, @Param(value="obj")String obj);

	int UserNameTrueNameSelect(@Param(value="username")String name, @Param(value="tname")String tname);

	int insert(UserEntity entity);

	int LoginIpAndTime(@Param(value="code")String code,@Param(value="ip") String ip, @Param(value="time")Date date);

	UserEntity selectBykeyId(@Param(value="code")String code);

	int SelectUserNamePwd(@Param(value="name")String name, @Param(value="pwd")String pwd);

	int EditPwd(@Param(value="code")String code, @Param(value="pwd")String pwd);

	int editImg(@Param(value="code")String code, @Param(value="img")String fileName);

	List<UserEntity> selectByPrivateList();

}
